﻿using XYAC.Framework.MonitorTireMaterialManual.Context;
using XYAC.Framework.MonitorTireMaterialManual.LocalData.Context;

namespace XYAC.Framework.MonitorTireMaterialManual.IServices
{
    public interface ILocalDataService : IServiceBase<int, LocalDataContext>
    {
        /// <summary>
        /// 创建数据库
        /// </summary>
        /// <returns></returns>
        bool CreateDb();

        /// <summary>
        /// 定期删除LocalRecord记录数据
        /// </summary>
        /// <param name="days"></param>
        /// <returns></returns>
        int RemoveTimeovered(int days);

        #region Today当日数据上传
  
        /// <summary>
        /// 上传胎侧检测数据到远程数据库
        /// </summary>
        /// <typeparam name="TContext"></typeparam>
        /// <param name="RowData"></param>
        /// <returns></returns>
        int SyncSemiSteelSideInspectionReportToRemote<TContext>(int RowData = 20) where TContext : ReportContext;
        /// <summary>
        /// 上传胎面检测数据到远程数据库
        /// </summary>
        /// <typeparam name="TContext"></typeparam>
        /// <param name="RowData"></param>
        /// <returns></returns>
        int SyncSemiSteelTreadScanReportToRemote<TContext>(int RowData = 20) where TContext : ReportContext;

        /// <summary>
        /// 上传三角胶数据到远程数据库
        /// </summary>
        /// <typeparam name="TContext"></typeparam>
        /// <param name="RowData"></param>
        /// <returns></returns>
        int SyncSemiSteelTriangleRubberReportToRemote<TContext>(int RowData = 20) where TContext : ReportContext;

        /// <summary>
        /// 上传班前标准块扫描数据到远程数据库
        /// </summary>
        /// <typeparam name="TContext"></typeparam>
        /// <param name="RowData"></param>
        /// <returns></returns>
        int SyncPreCheckReportToRemote<TContext>(int RowData = 20) where TContext : ReportContext;
        #endregion



        #region Yesterday 昨日数据上传
        /// <summary>
        /// 上传三角胶数据到远程数据库(昨日)
        /// </summary>
        /// <typeparam name="TContext"></typeparam>
        /// <param name="RowData"></param>
        /// <returns></returns>
        int SyncSemiSteelTriangleRubberReport_YST_ToRemote(int RowData = 20);


        /// <summary>
        /// 上传胎侧检测数据到远程数据库(昨日)
        /// </summary>
        /// <typeparam name="TContext"></typeparam>
        /// <param name="RowData"></param>
        /// <returns></returns>
        int SyncSemiSteelSideInspectionReport_YST_ToRemote(int RowData = 20);
        /// <summary>
        /// 上传胎面检测数据到远程数据库(昨日)
        /// </summary>
        /// <typeparam name="TContext"></typeparam>
        /// <param name="RowData"></param>
        /// <returns></returns>
        int SyncSemiSteelTreadScanReport_YST_ToRemote(int RowData = 20);
        /// <summary>
        /// 上传昨日标准块检测数据
        /// </summary>
        /// <param name="RowData"></param>
        /// <returns></returns>
        int SyncPrecheckTreadScanReport_YST_ToRemote(int RowData = 20);
        #endregion


        #region 人工指定的数据上传
        /// <summary>
        /// 上传三角胶数据到远程数据库(人工指定上传日期)
        /// </summary>
        /// <typeparam name="TContext"></typeparam>
        /// <param name="RowData"></param>
        /// <returns></returns>
        int SyncSemiSteelTriangleRubberReport_SpecDt_ToRemote(DateTime dt,int RowData = 20);

        /// <summary>
        /// 上传胎侧检测数据到远程数据库(人工指定上传日期)
        /// </summary>
        /// <typeparam name="TContext"></typeparam>
        /// <param name="RowData"></param>
        /// <returns></returns>
        int SyncSemiSteelSideInspectionReport_SpecDt_ToRemote(DateTime dt, int RowData = 20);
        /// <summary>
        /// 上传胎面检测数据到远程数据库(人工指定上传日期)
        /// </summary>
        /// <typeparam name="TContext"></typeparam>
        /// <param name="RowData"></param>
        /// <returns></returns>
        int SyncSemiSteelTreadScanReport_SpecDt_ToRemote(DateTime dt, int RowData = 20);

        #endregion

    }
}
